<?php

include_once 'jobmodel.php';
    
    $page = new pager();
    
    $list_job = get_all_job($page, "?page=");
    
    $list_job_ct  = get_job_by_id($_GET["id"]);
    
    $list_job_left = get_all_job_to_left_bar();
    
    if($_POST["checksubmit"] == "submitvl"){
        $date = date("Y-m-d H:i:s",  strtotime("{$_POST["ngaydang"]}"));
        $array = array(
            "id" => "''",
            "user_id" => "{$_COOKIE["id"]}",
            "tenvieclam" => "'{$_POST["tenvieclam"]}'",
            "ngaydang" => "'{$date}'",
            "mieutacongviec" => "'{$_POST["mieutacongviec"]}'",
            "status" => "1"            
        );                        
        them_moi_job($array);
        echo "<script>window.location ='vieclam.php';</script>";
    }
?>
